<template>
  <div class="box">
    <bgBox>
      <sectionTitle title="公司规模"></sectionTitle>
      <div class="echartsContent">
      <!-- <pieEcharts/> -->
      <barEcharts :config="personsConfig" :data="personsScale"/>
      <!-- <leftTable1/> -->
      <!-- <leftTable2/> -->
      <!-- <lineEcharts/> -->
      <!-- <mixEcharts/> -->
      <!-- <otherPieEcharts/> -->
      <!-- <radarChart/> -->
      <!-- <scrollTalbe/> -->
      <!-- <timeLine/> -->

      </div>
    </bgBox>
  </div>
</template>

<script  setup lang="ts">
import bgBox from '../components/bgBox.vue'
import sectionTitle from '../components/sectionTitle.vue'
import pieEcharts from '../components/pieEcharts.vue'
import barEcharts from '../components/barEcharts.vue'
import leftTable1 from '../components/leftTable1.vue'
import leftTable2 from '../components/leftTable2.vue'
import lineEcharts from '../components/lineEcharts.vue'
import mixEcharts from '../components/mixEcharts.vue'
import otherPieEcharts from '../components/otherPieEcharts.vue'
import radarChart from '../components/radarChart.vue'
import scrollTalbe from '../components/scrollTable.vue'
import timeLine from '../components/timeLine.vue'

import { currentGET } from "@/api";
import { PopupType } from '../../index.d'
import { inject } from 'vue'
import { ref, reactive } from "vue";

const showPopup = inject('showPopup') as (data: PopupType) => void;
/**
 * 获取列表点击事件
 */
 const titleClick = (item: Object) => {
  console.log(item)
    showPopup({ type: 21, show: true, popupFlag: 'enterpriseList', searchInfo: {personsScaleMin: item.min, personsScaleMax: item.max }})
    // showPopup({ type: 5, show: true, popupFlag: 'info', })
}

const personsConfig = ref({
  showValue: true,
  unit: "人",
});
const personsScale = ref([]);
const outputValue = ref({});
const getData = () => {
  currentGET("enterpriseScale").then((res) => {
    console.log(res);
    if (res.success) {
      personsScale.value = res.data.personsScale;
      outputValue.value = res.data.outputValue;
    }
  });
};
getData();



</script>

<style scoped lang="less">
.box {
  height: 200px;
  .echartsContent {
    display: flex;
    flex-direction: row;
    height: 150px;
  }

}
</style>
